<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>UCARPP: includes/graphbmp-tools.h File Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">UCARPP
   &#160;<span id="projectnumber">1</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('graphbmp-tools_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">includes/graphbmp-tools.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="bmp-tools_8h_source.html">bmp-tools.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="solution_8h_source.html">solution.h</a>&quot;</code><br/>
<code>#include &lt;math.h&gt;</code><br/>
</div><div class="textblock"><div class="dynheader">
Include dependency graph for graphbmp-tools.h:</div>
<div class="dyncontent">
<div class="center"><img src="graphbmp-tools_8h__incl.png" border="0" usemap="#includes_2graphbmp-tools_8h" alt=""/></div>
<map name="includes_2graphbmp-tools_8h" id="includes_2graphbmp-tools_8h">
<area shape="rect" id="node3" href="bmp-tools_8h.html" title="bmp&#45;tools.h" alt="" coords="144,469,235,499"/><area shape="rect" id="node13" href="solution_8h.html" title="solution.h" alt="" coords="335,83,412,112"/><area shape="rect" id="node16" href="vehicleState_8h.html" title="vehicleState.h" alt="" coords="321,237,425,267"/><area shape="rect" id="node35" href="gMatrix_8h.html" title="gMatrix.h" alt="" coords="209,237,284,267"/><area shape="rect" id="node39" href="operations_8h.html" title="operations.h" alt="" coords="416,160,509,189"/><area shape="rect" id="node18" href="vehiclePath_8h.html" title="vehiclePath.h" alt="" coords="272,315,373,344"/><area shape="rect" id="node29" href="edgeGraph_8h.html" title="edgeGraph.h" alt="" coords="397,315,493,344"/><area shape="rect" id="node21" href="edgeSol_8h.html" title="edgeSol.h" alt="" coords="296,392,376,421"/><area shape="rect" id="node24" href="edgeID_8h.html" title="edgeID.h" alt="" coords="309,469,384,499"/><area shape="rect" id="node46" href="tabooList_8h.html" title="tabooList.h" alt="" coords="579,237,664,267"/><area shape="rect" id="node48" href="tabooExpire_8h.html" title="tabooExpire.h" alt="" coords="589,392,691,421"/></map>
</div>
</div>
<p><a href="graphbmp-tools_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="graphbmp-tools_8h.html#a80dc925e6879f85aa743543b7966ef6d">drawNode</a> (<a class="el" href="bmp-tools_8h.html#ab031ba345632642ed0e54b7315d1767e">Pimage</a> img, int x, int y, int radius, <a class="el" href="structRGB.html">RGB</a> color)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">applica i servizi offerti da bmp-tools per offrire semplici strumenti per il disegno del grafo  <a href="#a80dc925e6879f85aa743543b7966ef6d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="graphbmp-tools_8h.html#a5f25250af99c4ca3ae2a14805b0f4a1f">drawNodes</a> (<a class="el" href="bmp-tools_8h.html#ab031ba345632642ed0e54b7315d1767e">Pimage</a> img, int N, float graphradius, float noderadius, int depot, float nodenumbergap, int digitgap, int numberheight, int numberwidth, int numberradius, <a class="el" href="structRGB.html">RGB</a> numbercolor, <a class="el" href="structRGB.html">RGB</a> normalcolor, <a class="el" href="structRGB.html">RGB</a> depotcolor)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="graphbmp-tools_8h.html#a734d67e36144120a5fe3cc18f7955e9a">drawSolution</a> (FILE *f, <a class="el" href="solution_8h.html#a51498378a2ebad2f10298fbf2ad5613c">Psolution</a> solution, int depotnode, int nodeRadius, int nodeGap, int nodeNumberGap, int digitGap, int numberHeight, int NumberWidth, int numberRadius, <a class="el" href="structRGB.html">RGB</a> numberColor, <a class="el" href="structRGB.html">RGB</a> nodeColor, <a class="el" href="structRGB.html">RGB</a> depotColor)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="graphbmp-tools_8h.html#a900a139794128eba994e5f1955624362">drawSolutionFromScratch</a> (char *fileName, <a class="el" href="solution_8h.html#a51498378a2ebad2f10298fbf2ad5613c">Psolution</a> solution, int depotnode, int nodeRadius, int nodeGap, int nodeNumberGap, int digitGap, int numberHeight, int NumberWidth, int numberRadius, <a class="el" href="structRGB.html">RGB</a> numberColor, <a class="el" href="structRGB.html">RGB</a> nodeColor, <a class="el" href="structRGB.html">RGB</a> depotColor)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="graphbmp-tools_8h.html#a095a0ffd6a30b516ec39ab5376aea787">drawSolutionFromScratchDefaults</a> (char *fileName, <a class="el" href="solution_8h.html#a51498378a2ebad2f10298fbf2ad5613c">Psolution</a> ps, int depotnode)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="graphbmp-tools_8h.html#a97195573422ef67cf08cee2bdd038012">getXYBMP</a> (int N, int n, float graphradius, int widthBMP, int heightBMP, int *x, int *y)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="graphbmp-tools_8h.html#a9f253da9a4245ca07586212075c8567a">drawNodeLine</a> (<a class="el" href="bmp-tools_8h.html#ab031ba345632642ed0e54b7315d1767e">Pimage</a> img, int N, int graphRadius, int from, int to, int lineradius, <a class="el" href="structRGB.html">RGB</a> color)</td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a80dc925e6879f85aa743543b7966ef6d"></a><!-- doxytag: member="graphbmp&#45;tools.h::drawNode" ref="a80dc925e6879f85aa743543b7966ef6d" args="(Pimage img, int x, int y, int radius, RGB color)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="graphbmp-tools_8h.html#a80dc925e6879f85aa743543b7966ef6d">drawNode</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="bmp-tools_8h.html#ab031ba345632642ed0e54b7315d1767e">Pimage</a>&#160;</td>
          <td class="paramname"><em>img</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>radius</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structRGB.html">RGB</a>&#160;</td>
          <td class="paramname"><em>color</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>applica i servizi offerti da bmp-tools per offrire semplici strumenti per il disegno del grafo </p>
<p><a class="el" href="graphbmp-tools_8h.html">graphbmp-tools.h</a></p>
<p>Created on: May 21, 2013 Author: koldardisegna un nodo del grafo. Il nodo e' rappresentanto da un quadrato di lato due volte radius </p>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>img non NULL </li>
<li>x appartiene a [0;W[ </li>
<li>y appartiene a [0;H[ </li>
<li>radius positivo o nullo </li>
</ul>
</dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd>una forma rappresentante il nodo alle coordinate (x;y)</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">img</td><td>l'immagine su cui disegnare il nodo </td></tr>
    <tr><td class="paramname">x</td><td>la coordinata x del centro del nodo </td></tr>
    <tr><td class="paramname">y</td><td>la coordinata y del centro del nodo </td></tr>
    <tr><td class="paramname">radius</td><td>il raggio del nodo </td></tr>
    <tr><td class="paramname">color</td><td>il colore con cui riempire la forma del nodo </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a9f253da9a4245ca07586212075c8567a"></a><!-- doxytag: member="graphbmp&#45;tools.h::drawNodeLine" ref="a9f253da9a4245ca07586212075c8567a" args="(Pimage img, int N, int graphRadius, int from, int to, int lineradius, RGB color)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="graphbmp-tools_8h.html#a9f253da9a4245ca07586212075c8567a">drawNodeLine</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="bmp-tools_8h.html#ab031ba345632642ed0e54b7315d1767e">Pimage</a>&#160;</td>
          <td class="paramname"><em>img</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>N</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>graphRadius</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>from</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>to</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>lineradius</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structRGB.html">RGB</a>&#160;</td>
          <td class="paramname"><em>color</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>disegna una linea che parte da un nodo from e arriva ad un nodo to</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">img</td><td>l'immagine su cui disegnare sopra </td></tr>
    <tr><td class="paramname">N</td><td>il numero di nodi totali del grafo </td></tr>
    <tr><td class="paramname">graphRadius</td><td>il raggio della circonferenza su cui sono collocati i nodi </td></tr>
    <tr><td class="paramname">from</td><td>il primo nodo da cui parte la linea </td></tr>
    <tr><td class="paramname">to</td><td>il secondo nodo a cui arriva la linea </td></tr>
    <tr><td class="paramname">lineradius</td><td>il raggio della linea da disegnare </td></tr>
    <tr><td class="paramname">color</td><td>il colore della linea da disegnare </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a5f25250af99c4ca3ae2a14805b0f4a1f"></a><!-- doxytag: member="graphbmp&#45;tools.h::drawNodes" ref="a5f25250af99c4ca3ae2a14805b0f4a1f" args="(Pimage img, int N, float graphradius, float noderadius, int depot, float nodenumbergap, int digitgap, int numberheight, int numberwidth, int numberradius, RGB numbercolor, RGB normalcolor, RGB depotcolor)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="graphbmp-tools_8h.html#a5f25250af99c4ca3ae2a14805b0f4a1f">drawNodes</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="bmp-tools_8h.html#ab031ba345632642ed0e54b7315d1767e">Pimage</a>&#160;</td>
          <td class="paramname"><em>img</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>N</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>graphradius</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>noderadius</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>depot</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>nodenumbergap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>digitgap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>numberheight</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>numberwidth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>numberradius</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structRGB.html">RGB</a>&#160;</td>
          <td class="paramname"><em>numbercolor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structRGB.html">RGB</a>&#160;</td>
          <td class="paramname"><em>normalcolor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structRGB.html">RGB</a>&#160;</td>
          <td class="paramname"><em>depotcolor</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>disegna tutti i nodi del grafo. Essi vengono disposti lungo una circonferenza avente come centro il centro dell'immagine: in questo modo aumentando il numero di nodi il grafo e' comunque abbasrtanza leggibile</p>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>img non NULL </li>
<li>N non negativo </li>
<li>graphradius non negativo e strettamente minore della meta' del minimo tra la lunghezza e l'altezza dell'immagine </li>
<li>noderadius non negativo e "piccolo" rispetto a graphradius </li>
<li></li>
</ul>
</dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd><ul>
<li>gli N nodi vengono disposti su una circonferenza centrata al centro dell'immagine di raggio graphradius </li>
<li>i numero dei nodi vengono disposti su una circonferenza centrata al centro dell'immagine di raggio graphradius-nodenumbergap*noderadius</li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">img</td><td>indica l'immagine da modificare </td></tr>
    <tr><td class="paramname">N</td><td>il numero di nodi di cui e' composto il grafo </td></tr>
    <tr><td class="paramname">graphradius</td><td>il raggio della circonferenza su cui sono disposti i nodi </td></tr>
    <tr><td class="paramname">noderadius</td><td>il raggio di ogni singolo nodo del grafo </td></tr>
    <tr><td class="paramname">depot</td><td>il nodo deposito del grafo </td></tr>
    <tr><td class="paramname">nodenumbergap</td><td>un indicatore della distanza tra la circonferenza su cui stanno i nodi e quella su cui stanno i numeri </td></tr>
    <tr><td class="paramname">digitgap</td><td>indica la distanza che intercorre tra le cifre che compongono il numero di un nodo (in nodeRadius) </td></tr>
    <tr><td class="paramname">numberheight</td><td>l'altezza di una cifra di un nodo (rapportata a noderadius) </td></tr>
    <tr><td class="paramname">numberwidth</td><td>la lunghezza di una cifra di un nodo (rapportata a noderadius) </td></tr>
    <tr><td class="paramname">numberradius</td><td>indica, come unita' di misura il nodradius scelto, di quanto e' minore il raggio della circonferenza su cui sono disposti i numeri identificativi dei nodi rispetto a graphradius </td></tr>
    <tr><td class="paramname">numbercolor</td><td>indica il colore con cui colorare i numeri dei nodi </td></tr>
    <tr><td class="paramname">normalcolor</td><td>indica il colore con cui colorare i nodi </td></tr>
    <tr><td class="paramname">depotcolor</td><td>indica il colore con cui colorare il deposito </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a734d67e36144120a5fe3cc18f7955e9a"></a><!-- doxytag: member="graphbmp&#45;tools.h::drawSolution" ref="a734d67e36144120a5fe3cc18f7955e9a" args="(FILE *f, Psolution solution, int depotnode, int nodeRadius, int nodeGap, int nodeNumberGap, int digitGap, int numberHeight, int NumberWidth, int numberRadius, RGB numberColor, RGB nodeColor, RGB depotColor)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="graphbmp-tools_8h.html#a734d67e36144120a5fe3cc18f7955e9a">drawSolution</a> </td>
          <td>(</td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>f</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="solution_8h.html#a51498378a2ebad2f10298fbf2ad5613c">Psolution</a>&#160;</td>
          <td class="paramname"><em>solution</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>depotnode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>nodeRadius</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>nodeGap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>nodeNumberGap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>digitGap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>numberHeight</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>NumberWidth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>numberRadius</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structRGB.html">RGB</a>&#160;</td>
          <td class="paramname"><em>numberColor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structRGB.html">RGB</a>&#160;</td>
          <td class="paramname"><em>nodeColor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structRGB.html">RGB</a>&#160;</td>
          <td class="paramname"><em>depotColor</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>disegna la soluzione passata sul file f. Il resto dei parametri sono opzioni grafiche</p>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>f non e' NULL ed e' stato aperto in lettura (fopen(file,"r"); ) </li>
<li>solution non NULL </li>
<li>depotnode compreso tra 0 (incluso) e il numero di nodi della soluzione </li>
<li>ogni parametro intero deve essere positivo (o nullo) </li>
</ul>
</dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd><ul>
<li>f correttamente chiuso </li>
<li>f interpretabile come un'immagine bitmap </li>
<li>f contiene una rappresentazione grafica della soluzione solution</li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>il file su cui disegnare </td></tr>
    <tr><td class="paramname">solution</td><td>indica la soluzione da disegnare </td></tr>
    <tr><td class="paramname">depotnode</td><td>il nodo deposito della soluzione </td></tr>
    <tr><td class="paramname">nodeRadius</td><td>il raggio di ogni nodo da disegnare </td></tr>
    <tr><td class="paramname">nodeGap</td><td>un parametro che approssima la distanza minima che devono avere i nodi tra di loro </td></tr>
    <tr><td class="paramname">nodeNumberGap</td><td>un indicatore di quanto e' distante la circonferenza su cui stanno i nodi da quella su cui stanno i numeri </td></tr>
    <tr><td class="paramname">digitGap</td><td>un parametro che gestisce la distanza tra le cifre di uno stesso numero di un nodo (in nodeRadius) </td></tr>
    <tr><td class="paramname">numberHeight</td><td>l'altezza (in nodeRadius) delle cifre del numero del nodo </td></tr>
    <tr><td class="paramname">NumberWidth</td><td>la lunghezza (in nodeRadius) delle cifre del numero del nodo </td></tr>
    <tr><td class="paramname">numberRadius</td><td>il raggio della linea che compone il numero di un nodo </td></tr>
    <tr><td class="paramname">numberColor</td><td>il colore dei numeri dei nodi </td></tr>
    <tr><td class="paramname">nodeColor</td><td>il colore di un nodo </td></tr>
    <tr><td class="paramname">depotColor</td><td>il colore del nodo deposito </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a900a139794128eba994e5f1955624362"></a><!-- doxytag: member="graphbmp&#45;tools.h::drawSolutionFromScratch" ref="a900a139794128eba994e5f1955624362" args="(char *fileName, Psolution solution, int depotnode, int nodeRadius, int nodeGap, int nodeNumberGap, int digitGap, int numberHeight, int NumberWidth, int numberRadius, RGB numberColor, RGB nodeColor, RGB depotColor)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="graphbmp-tools_8h.html#a900a139794128eba994e5f1955624362">drawSolutionFromScratch</a> </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>fileName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="solution_8h.html#a51498378a2ebad2f10298fbf2ad5613c">Psolution</a>&#160;</td>
          <td class="paramname"><em>solution</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>depotnode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>nodeRadius</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>nodeGap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>nodeNumberGap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>digitGap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>numberHeight</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>NumberWidth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>numberRadius</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structRGB.html">RGB</a>&#160;</td>
          <td class="paramname"><em>numberColor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structRGB.html">RGB</a>&#160;</td>
          <td class="paramname"><em>nodeColor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structRGB.html">RGB</a>&#160;</td>
          <td class="paramname"><em>depotColor</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>disegna la soluzione passata sul file f. Il resto dei parametri sono opzioni grafiche</p>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>solution non NULL </li>
<li>depotnode compreso tra 0 (incluso) e il numero di nodi della soluzione </li>
<li>ogni parametro intero deve essere positivo (o nullo) </li>
</ul>
</dd></dl>
<dl class="post"><dt><b>Postcondition:</b></dt><dd><ul>
<li>creato un file nella stessa directory in cui si trova l'applicativo che lo usa se il file non esisteva, riscritto se gia' ne esisteva uno </li>
<li>file correttamente chiuso </li>
<li>file interpretabile come un'immagine bitmap </li>
<li>file contiene una rappresentazione grafica della soluzione solution</li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>il nome del file (eventualmente da creare) su cui disegnare </td></tr>
    <tr><td class="paramname">solution</td><td>indica la soluzione da disegnare </td></tr>
    <tr><td class="paramname">depotnode</td><td>il nodo deposito della soluzione </td></tr>
    <tr><td class="paramname">nodeRadius</td><td>il raggio di ogni nodo da disegnare </td></tr>
    <tr><td class="paramname">nodeGap</td><td>un parametro che approssima la distanza minima che devono avere i nodi tra di loro </td></tr>
    <tr><td class="paramname">nodeNumberGap</td><td>un indicatore di quanto e' distante la circonferenza su cui stanno i nodi da quella su cui stanno i numeri </td></tr>
    <tr><td class="paramname">digitGap</td><td>un parametro che gestisce la distanza tra le cifre di uno stesso numero di un nodo (in nodeRadius) </td></tr>
    <tr><td class="paramname">numberHeight</td><td>l'altezza (in nodeRadius) delle cifre del numero del nodo </td></tr>
    <tr><td class="paramname">NumberWidth</td><td>la lunghezza (in nodeRadius) delle cifre del numero del nodo </td></tr>
    <tr><td class="paramname">numberRadius</td><td>il raggio della linea che compone il numero di un nodo </td></tr>
    <tr><td class="paramname">numberColor</td><td>il colore dei numeri dei nodi </td></tr>
    <tr><td class="paramname">nodeColor</td><td>il colore di un nodo </td></tr>
    <tr><td class="paramname">depotColor</td><td>il colore del nodo deposito </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a095a0ffd6a30b516ec39ab5376aea787"></a><!-- doxytag: member="graphbmp&#45;tools.h::drawSolutionFromScratchDefaults" ref="a095a0ffd6a30b516ec39ab5376aea787" args="(char *fileName, Psolution ps, int depotnode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="graphbmp-tools_8h.html#a095a0ffd6a30b516ec39ab5376aea787">drawSolutionFromScratchDefaults</a> </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>fileName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="solution_8h.html#a51498378a2ebad2f10298fbf2ad5613c">Psolution</a>&#160;</td>
          <td class="paramname"><em>ps</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>depotnode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Wrappa drawSolutionFromScratch hardcodando perchè pat ODIA infiniti prototipi numerici. </p>

</div>
</div>
<a class="anchor" id="a97195573422ef67cf08cee2bdd038012"></a><!-- doxytag: member="graphbmp&#45;tools.h::getXYBMP" ref="a97195573422ef67cf08cee2bdd038012" args="(int N, int n, float graphradius, int widthBMP, int heightBMP, int *x, int *y)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="graphbmp-tools_8h.html#a97195573422ef67cf08cee2bdd038012">getXYBMP</a> </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>N</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>graphradius</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>widthBMP</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>heightBMP</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>trasforma le coordinate polari di un punto (graphradius come rho e n come theta) in coordinate cartesiane.</p>
<dl class="pre"><dt><b>Precondition:</b></dt><dd><ul>
<li>x e y non sono NULL </li>
<li>widthBMP, heightBMP e graph radius sono strettamente positivi</li>
</ul>
</dd></dl>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">N</td><td>il numero di nodi; grazie ad esso e' possibile stabilire qual'e l'angolo base (2PI/N) </td></tr>
    <tr><td class="paramname">n</td><td>il numero del nodo di cui si vogliono reperire le coordinate cartesiane </td></tr>
    <tr><td class="paramname">graphradius</td><td>il raggio della circonferenza </td></tr>
    <tr><td class="paramname">widthBMP</td><td>la lunghezza della bitmap </td></tr>
    <tr><td class="paramname">heightBMP</td><td>l'altezza della bitmap </td></tr>
    <tr><td class="paramname">x</td><td>l'area di memoria in cui collocare la coordinata cartesiana che esprime l'ascissa del punto </td></tr>
    <tr><td class="paramname">y</td><td>l'area di memoria in cui collocare la coordinata cartesiana che esprime l'ordinata del punto </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="graphbmp-tools_8h.html">graphbmp-tools.h</a>      </li>

    <li class="footer">Generated on Thu Jun 27 2013 11:34:36 for UCARPP by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
   </ul>
 </div>


</body>
</html>
